package com.mtzqc.common.img.engine

import com.luck.picture.lib.engine.CompressFileEngine
import com.luck.picture.lib.engine.CropFileEngine
import com.luck.picture.lib.engine.ImageEngine
import com.yalantis.ucrop.UCropImageEngine

object Engine {
    private val imgEngine by lazy {
        ImageEngineImpl()
    }

    private val uCropImageEngine by lazy {
        UCropImageEngineImpl()
    }

    private val squareUCropEngine by lazy {
        UCropEngineImpl()
    }

    private val compressFileEngine by lazy {
        CompressFileEngineImpl()
    }

    @JvmStatic
    fun imgEngine(): ImageEngine? {
        return imgEngine
    }

    @JvmStatic
    fun uCropImageEngine(): UCropImageEngine? {
        return uCropImageEngine
    }

    /**
     * 正方形剪裁
     */
    @JvmStatic
    fun squareUCropEngine(): CropFileEngine? {
        return squareUCropEngine
    }

    /**
     * 压缩
     */
    @JvmStatic
    fun compressEngine(): CompressFileEngine? {
        return compressFileEngine
    }


}